import request from "@/request";
import ApiResponse from '../common/api-response.ts';
import {Subscription} from "@/api/subscription/subscription";


export default class SubscriptionApi {

    static async members(): Promise<ApiResponse<Subscription>> {
        return ApiResponse.fromResponse(await request.get("/member/members"));
    }

    static async payment(memberId: number): Promise<ApiResponse<string>> {
        return ApiResponse.fromResponse(await request.post("/payment/createPaymentIntent", {
            memberCardId: memberId
        }));
    }
}

